Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/IR/Intrinsics.h b/linux-x64/clang/include/llvm/IR/Intrinsics.h
index f38f920..08f64be 100644
--- a/linux-x64/clang/include/llvm/IR/Intrinsics.h
+++ b/linux-x64/clang/include/llvm/IR/Intrinsics.h
@@ -18,6 +18,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/Support/TypeSize.h"
#include <string>
namespace llvm {
@@ -33,14 +34,17 @@
/// function known by LLVM. The enum values are returned by
/// Function::getIntrinsicID().
namespace Intrinsic {
- enum ID : unsigned {
- not_intrinsic = 0, // Must be zero
+ // Intrinsic ID type. This is an opaque typedef to facilitate splitting up
+ // the enum into target-specific enums.
+ typedef unsigned ID;
- // Get the intrinsic enums generated from Intrinsics.td
+ enum IndependentIntrinsics : unsigned {
+ not_intrinsic = 0, // Must be zero
+
+ // Get the intrinsic enums generated from Intrinsics.td
#define GET_INTRINSIC_ENUM_VALUES
#include "llvm/IR/IntrinsicEnums.inc"
#undef GET_INTRINSIC_ENUM_VALUES
- , num_intrinsics
};
/// Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
@@ -96,20 +100,42 @@
/// intrinsic. This is returned by getIntrinsicInfoTableEntries.
struct IITDescriptor {
enum IITDescriptorKind {
- Void, VarArg, MMX, Token, Metadata, Half, Float, Double, Quad,
- Integer, Vector, Pointer, Struct,
- Argument, ExtendArgument, TruncArgument, HalfVecArgument,
- SameVecWidthArgument, PtrToArgument, PtrToElt, VecOfAnyPtrsToElt,
- VecElementArgument
+ Void,
+ VarArg,
+ MMX,
+ Token,
+ Metadata,
+ Half,
+ BFloat,
+ Float,
+ Double,
+ Quad,
+ Integer,
+ Vector,
+ Pointer,
+ Struct,
+ Argument,
+ ExtendArgument,
+ TruncArgument,
+ HalfVecArgument,
+ SameVecWidthArgument,
+ PtrToArgument,
+ PtrToElt,
+ VecOfAnyPtrsToElt,
+ VecElementArgument,
+ Subdivide2Argument,
+ Subdivide4Argument,
+ VecOfBitcastsToInt,
+ AMX
} Kind;
union {
unsigned Integer_Width;
unsigned Float_Width;
- unsigned Vector_Width;
unsigned Pointer_AddressSpace;
unsigned Struct_NumElements;
unsigned Argument_Info;
+ ElementCount Vector_Width;
};
enum ArgKind {
@@ -125,14 +151,17 @@
assert(Kind == Argument || Kind == ExtendArgument ||
Kind == TruncArgument || Kind == HalfVecArgument ||
Kind == SameVecWidthArgument || Kind == PtrToArgument ||
- Kind == PtrToElt || Kind == VecElementArgument);
+ Kind == PtrToElt || Kind == VecElementArgument ||
+ Kind == Subdivide2Argument || Kind == Subdivide4Argument ||
+ Kind == VecOfBitcastsToInt);
return Argument_Info >> 3;
}
ArgKind getArgumentKind() const {
assert(Kind == Argument || Kind == ExtendArgument ||
Kind == TruncArgument || Kind == HalfVecArgument ||
Kind == SameVecWidthArgument || Kind == PtrToArgument ||
- Kind == VecElementArgument);
+ Kind == VecElementArgument || Kind == Subdivide2Argument ||
+ Kind == Subdivide4Argument || Kind == VecOfBitcastsToInt);
return (ArgKind)(Argument_Info & 7);
}
@@ -158,6 +187,12 @@
IITDescriptor Result = {K, {Field}};
return Result;
}
+
+ static IITDescriptor getVector(unsigned Width, bool IsScalable) {
+ IITDescriptor Result = {Vector, {0}};
+ Result.Vector_Width = ElementCount::get(Width, IsScalable);
+ return Result;
+ }
};
/// Return the IIT table descriptor for the specified intrinsic into an array
@@ -186,6 +221,13 @@
/// This method returns true on error.
bool matchIntrinsicVarArg(bool isVarArg, ArrayRef<IITDescriptor> &Infos);
+ /// Gets the type arguments of an intrinsic call by matching type contraints
+ /// specified by the .td file. The overloaded types are pushed into the
+ /// AgTys vector.
+ ///
+ /// Returns false if the given function is not a valid intrinsic call.
+ bool getIntrinsicSignature(Function *F, SmallVectorImpl<Type *> &ArgTys);
+
// Checks if the intrinsic name matches with its signature and if not
// returns the declaration with the same signature and remangled name.
llvm::Optional<Function*> remangleIntrinsicFunction(Function *F);